import { IFeidaoAiBrowserComponent } from '@feidao/web/interfaces';
import nodejs from '@feidao/web/atom/nodejs/msg-b/nodejs';
import fire_component_msg from '@feidao/web/atom/browser/fsm/fire-component-msg';

export default async function a008(fd: IFeidaoAiBrowserComponent, ...args: any[]) {
	// 确定删除　调用事件
	const ret = await nodejs(fd.data.spaceid, "dept_del", { deptid: fd.data.curr_dept.deptid });
	if (ret == 'success') {
		// fire_component_msg('zj-common-002', 'ec-001', ret, '操作成功');
		fd.fire('a006');//刷新页面
	} else {
		fire_component_msg('zj-common-002', 'ec-001', 'fail', '操作失败');
	}
}
